import Http from '@/utils/http';
import { delCookieAll } from '@/utils/common.js';
import { Server } from 'https';
var http = new Http();

export default{
    getIndexData:(data) => {
        return http.get('index/index',data);
    },
    getAdsListByAlias: (data) => {
        return http.get('misc/getAdsListByAlias', data);
    },
    getHotGoodsList: (data) => {
        return http.get('goods/getHotGoodsList', data);
    },
    getRcmndGoodsList: (data) => {//推荐商品
		return http.get('goods/getRcmndGoodsList', data);
    },
    
    getAdsListByAlias: (data) => {
        return http.get('misc/getAdsListByAlias', data)
    },
	getDiaryIndex: (data) => {
		return http.get('Diary/getDiaryIndex', data);
	},
	getPlasticlist: (data) => {
		return http.get('Misc/getPlasticlist', data);
	},
	getDoctorList: (data) => {
		return http.get('doctor/getDoctorList', data);
	},
	getHospitalList: (data) => {
		return http.get('hospital/getHospitalList', data);
	},
	getHospitalDetail: (data) => {
		return http.get('hospital/getHospitalDetail', data);
	},
	getHospitalProjList: (data) => {
		return http.get('hospital/getHospitalProjList', data);
	},
	search: (data) => {
		return http.get('search/search', data);
	},
	getHotSearch: (data) => {
		return http.get('search/getHotSearch', data);
	},
	gerCircleList: (data) => {
		return http.get('v2/circle/circleList', data);
	},
	getCircleDetail: (data) => {
		return http.get('v2/circle/circleDetail', data);
	},
	getHospitalDoctorList: (data) => {
		return http.get('hospital/getHospitalDoctorList', data);
	},
	getDoctorList: (data) => {
		return http.get('doctor/getDoctorList', data);
	},
	getDoctorProjList: (data) => {
		return http.get('doctor/getDoctorProjList', data);
	},
	getDoctorProfile: (data) => {
		return http.get('doctor/getDoctorProfile', data);
	},
	getDoctorDetail: (data) => {
		return http.get('doctor/getDoctorDetail', data);
	},
	getDoctorFansList: (data) => {
		return http.get('doctor/getDoctorFansList', data);
	},
	getDoctorCaseList: (data) => {
		return http.get('doctor/getDoctorCaseList', data);
	},
	getProjProdDetail: (data) => {
		return http.get('proj/getProjProdDetail', data);
	},
	getDiaryDetail: (data) => {
		return http.get('diary/getDiaryDetail', data);
	},
	getProjProdCaseList: (data) => {
		return http.get('proj/getProjProdCaseList', data);
	},
	getProjectDetail: (data) => {
		return http.get('proj/getProjectDetail', data);
	},
	getProjProdList: (data) => {
		return http.get('proj/getProjProdList', data);
	},
	getProjCaseList: (data) => {
		return http.get('proj/getProjCaseList', data);
	},
	getHotGoodsList: (data) => {//热门商品
		return http.get('goods/getHotGoodsList', data);
	},
	getRcmndGoodsList: (data) => {//推荐商品
		return http.get('goods/getRcmndGoodsList', data);
	},
	verify: (data) => {//图形验证码
		return http.getCode('account/verify?t='+Math.random(), data);
	},
	login: (data) => {//密码登录
		return http.post('account/login', data);
	},
	captchaLogin: (data) => {//验证码登录
		return http.post('account/captchaLogin', data);
	},
	getAgreementList: (data) => {//获取协议列表
		return http.get('misc/getAgreementList', data);
	},
	register: (data) => {//注册
		return http.post('account/register', data);
	},
	sendCaptcha: (data) => {//发送验证码
		return http.post('account/sendCaptcha', data);
	},
	getDiaryTagList: (data) => {//创建日记本获取标签
		return http.get('v2/diary/getDiaryTagList', data);
	},
	getDiaryDoctorList: (data) => {//创建日记本获取医生
		return http.get('v2/diary/getDiaryDoctorList', data);
	},
	addDiaryCover: (data , file) => {//创建日记
		return http.postFile('v2/diary/addDiaryCover', data, file);
	},
	addDiaryNote: (data , file) => {//添加日记
		return http.postFile('v2/diary/addDiaryNote', data, file);
	},
	getUsrDiaryList: (data) => {//我的日记-暂时没有用
		return http.get('v2/member/getUsrDiaryList', data);
	},
	getUserDiaryList: (data) => {//我的日记
		return http.get('user/getUserDiaryList', data);
	},
	getFansList: (data) => {//我的粉丝-暂时没有用
		return http.get('v2/member/getFansList', data);
	},
	getUserFansList: (data) => {//我的粉丝
		return http.get('user/getUserFansList', data);
	},
	getFollowedMemberList: (data) => {//我的关注-暂时没用用
		return http.get('v2/member/getFollowedMemberList', data);
	},
	getUserFollowedList: (data) => {//我的关注
		return http.get('user/getUserFollowedList', data);
	},
	followUpMember: (data) => {//关注某用户
		return http.post('v2/member/followUpMember', data);
	},
	saveProfile: (data) => {//保存用户信息
		return http.post('member/saveProfile', data);
	},
	getUsrSysMsgList: (data) => {//当前用户系统消息
		return http.get('member/getUsrSysMsgList', data);
	},
	getSysMsgContent: (data) => {//系统消息详情
		return http.get('member/getSysMsgContent', data);
	},
	getProvinceList: (data) => {//
		return http.get('Areas/getProvinceList', data);
	},
	getCityList: (data) => {//
		return http.get('Areas/getCityList', data);
	},
	getProvinceCity: (data) => {//
		return http.get('Areas/getProvinceCity', data);
	},
	getUserMainInfo: (data) => {//获取某个用户概要
		return http.get('user/getUserMainInfo', data);
	},
	followUpCircle: (data) => {//关注/取消圈子
		return http.post('v2/circle/followUpCircle', data);
	},
	uploadHeadimg: (data,file) => {//修改头像
		return http.postFile('member/uploadHeadimg', data ,file);
	},
	addOrder: (data) => {//下单
		return http.post('order/addOrder', data);
	},
	getWebWechatPayConfig: (data) => {//支付
		return http.post('order/getWebWechatPayConfig', data );
	},
	getOrderPayStatus: (data) => {//查询支付状态
		return http.post('order/getOrderPayStatus', data );
	},
	circleDayDiaryDetail: (data) => {//每篇日记详情
		return http.post('v2/circle/circleDayDiaryDetail', data);
	},
	diaryComment: (data) => {//评论日记
		return http.post('v2/diary/diaryComment', data);
	},
	diaryThumbUp: (data) => {//日记点赞
		return http.post('v2/diary/diaryThumbUp', data);
	},
	getOrderList: (data) => {//订单状态
		return http.post('order/getOrderList', data);
	},
	getOrderDetail: (data) => {//订单详情
		return http.get('order/getOrderDetail', data);
	},
	applyRefund: (data) => {//申请退款
		return http.post('order/applyRefund', data);
	},
	
}

// export class Server extends Http{
//     getIndexData(data){
//         return this.get('doctor/getDoctorList',data).then(this.httpCallBack);
//     }

//     httpCallBack(result){
//         if(result.data.status == 1){
//             return result.data.data;
//         }else if(result.data.status == 2){
//             delCookieAll();
//         }else{
//             console.log(result.data.message);
//         }
//     }
// }